import request from '@/utils/request'

// 查询存量业务列表
export function listUpload(query) {
  return request({
    url: '/afterloan/inventory-loan/list',
    method: 'get',
    params: query
  })
}

// 查询存量业务详细
export function getUpload(id) {
  return request({
    url: '/afterloan/inventory-loan/' + id,
    method: 'get'
  })
}

// 新增存量业务
export function addUpload(data) {
  return request({
    url: '/afterloan/inventory-loan/add',
    method: 'post',
    data: data
  })
}

// 修改存量业务
export function updateUpload(data) {
  return request({
    url: '/afterloan/inventory-loan/edit',
    method: 'post',
    data: data
  })
}

// 删除存量业务
export function delUpload(id) {
  return request({
    url: '/afterloan/inventory-loan/delete/' + id,
    method: 'get'
  })
}

// 导入存量业务
export function exportUpload(query) {
  return request({
    url: '/afterloan/inventory-loan/importData',
    method: 'get',
    params: query
  })
}

// 导出存量业务
export function exportinventory(query) {
  return request({
    url: '/afterloan/inventory-loan/export',
    method: 'get',
    params: query
  })
}

// 下载模版
export function importTemplate(query) {
  return request({
    url: '/afterloan/inventory-loan/importTemplate',
    method: 'get',
    params: query
  })
}
